<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta http-equiv="x-rim-auto-match" content="none">
    <title> 举报</title>
    <link href="../../assets/public/style/vv.css" rel="stylesheet" type="text/css" />

    <script src="../../assets/javascripts/jquery-1.10.2.min.js"></script>
    <script type="text/javascript">
        function submitReport(){

            var obj = document.getElementsByName("toushu");
            var tousu='';
            for(var i=0; i<obj.length; i ++){
                if(obj[i].checked){
                    toushu= obj[i].value;
                    tousu = obj[i].value ;
                }
            }
            if(tousu==''){
                return false;
            }else{
                return true;
            }



        }

        function dosub(){
            event.preventDefault();
            if(submitReport()){
                return false;
            }
            var data = {
                content:$("input:radio:checked").val()
            }
            $("input[name='content']")
            $.ajax("/www/addtousu", {data: data})
                .done(function (res) {
                    alert("投诉成功！");
                })
                .fail(function (res) {
                    alert("error");
                })
        }
    </script>
</head>
<body>
<form >

    <div class="text-center"> <div class="glyphicon glyphicon-exclamation-sign report-icon"></div>
        <div ng-show="!submited"> <h2>请选择投诉原因</h2> <br> <br> <div class="col-xs-12 col-sm-12 text-center"> <div class="checkbox-inline text-left">

            <label> <input type="radio"  value="色情、赌博、毒品" name="content"> 色情、赌博、毒品 </label><br>
            <label> <input type="radio"   value="谣言、社会负面、诈骗" name="content"> 谣言、社会负面、诈骗 </label><br>
            <label> <input type="radio"  value="邪教、非法集会、传销" name="content"> 邪教、非法集会、传销 </label><br>
            <label> <input type="radio"   value="医药、整形、虚假广告" name="content"> 医药、整形、虚假广告 </label><br>
            <label> <input type="radio"   value="有奖集赞和关注转发" name="content"> 有奖集赞和关注转发 </label><br>
            <label> <input type="radio"  value="违反国家政策和法律" name="content"> 违反国家政策和法律 </label><br>
            <label> <input type="radio"  value="其他原因" name="content"> 其他原因 </label>
        </div> </div> <div class="reported-label-div"> </div>
            <button onclick="dosub()"   class="btn btn-red col-xs-4 col-sm-4 col-sm-offset-4 col-xs-offset-4"> 提交 </button> </div>
    </div>
</form>
<script type="text/javascript">

</script>
</body>
</html>